package cn.anecansaitin.whimsy.client.event;

import net.minecraft.client.Camera;
import net.minecraft.client.Minecraft;
import net.minecraft.world.phys.Vec3;
import net.neoforged.bus.api.Event;

public class CameraSetupEvent extends Event {
    public Camera camera() {
        return Minecraft.getInstance().gameRenderer.getMainCamera();
    }

    public void move(double distanceOffset, double verticalOffset, double horizontalOffset) {
        camera().move(distanceOffset, verticalOffset, horizontalOffset);
    }

    public void setRotation(float yRot, float xRot) {
        camera().setRotation(yRot, xRot);
    }

    public void setPosition(Vec3 pos) {
        camera().setPosition(pos);
    }

    public void setPosition(double x, double y, double z) {
        camera().setPosition(x, y, z);
    }

    public double getMaxZoom(double startingDistance) {
        return camera().getMaxZoom(startingDistance);
    }
}
